﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace TranslatorService.Speech
{
    internal class GetAccessTokenEventArgs : SpeechEventArgs
    {
        private AdmAccessToken accessToken;
        /// <summary>
        /// Gets <see cref="TranslatorService.Speech.AdmAccessToken"/> object that contains the access token that you need to use to access the Microsoft Translator API.
        /// </summary>
        /// <value>The <see cref="TranslatorService.Speech.AdmAccessToken"/> object that contains the access token that you need to use to access the Microsoft Translator API.</value>
        public AdmAccessToken AccessToken
        {
            get
            {
                return base.ReturnValue(accessToken);
            }
            internal set
            {
                accessToken = value;
            }
        }

        /// <summary>
        /// Initializes a new instance of the <strong>GetAccessTokenEventArgs</strong> class.
        /// </summary>
        public GetAccessTokenEventArgs()
            : this(null, null)
        { }

        /// <summary>
        /// Initializes a new instance of the <strong>GetAccessTokenEventArgs</strong> class setting the specified <see cref="Exception"/> object.
        /// </summary>
        /// <param name="error">Any error that occurred during the asynchronous operation.</param>
        public GetAccessTokenEventArgs(Exception error)
            : this(null, error)
        { }

        /// <summary>
        /// Initializes a new instance of the <strong>GetAccessTokenEventArgs</strong> class using the specified <see cref="TranslatorService.Speech.AdmAccessToken"/> object.
        /// </summary>
        /// <param name="accessToken">Contains the access token that you need to use to access the Microsoft Translator API.</param>
        public GetAccessTokenEventArgs(AdmAccessToken accessToken)
            : this(accessToken, null)
        { }

        /// <summary>
        /// Initializes a new instance of the <strong>GetAccessTokenEventArgs</strong> class using the specified <see cref="TranslatorService.Speech.AdmAccessToken"/> object and <see cref="Exception"/>.
        /// </summary>
        /// <param name="accessToken">Contains the access token that you need to use to access the Microsoft Translator API.</param>
        /// <param name="error">Any error that occurred during the asynchronous operation.</param>
        public GetAccessTokenEventArgs(AdmAccessToken accessToken, Exception error)
            : base(error)
        {
            AccessToken = accessToken;
        }
    }
}
